set root=%~dp0

echo 拷贝.Net Core文件
copy %root%packages\config\platform\ %root%packages\platform\ /y

echo 版本校验
dotnet %root%tools/Tools/Tool.dll versioncheck -p %root%packages/config/package.yaml -d %root%packages/platform/Mysoft.Map6.Core.dll

if errorlevel 1 goto fail

echo 启动.Net Core
set ASPNETCORE_ENVIRONMENT=dev
cd %root%packages/platform/
dotnet Mysoft.Map6.Web.Core.dll --urls "http://*:9300"

cd %root%
exit /b 0

:fail
echo 执行出错,请检查提示
exit /b 1